{extend name="apps/common/view/front.tpl" /}
{block name="header_meta"}
<title>{$seoTitle}－{:config('common.site_name')}</title>
<meta name="keywords" content="{$seoKeywords}" />
<meta name="description" content="{$seoDescription}" />
<meta name="author" content="{:config('common.site_name')}" />
{/block}
{block name="header"}{include file="widget/header" /}{/block}
{block name="main"}
<div class="container">
  {include file="widget/slide" /}
  <!--categorys-->
  {assign name="categorys" value=":cmsCategorySelect(['field'=>'term_id,term_name,term_slug,term_action','parent'=>['eq',0],'status'=>'normal','limit'=>30,'sort'=>'term_order','order'=>'desc'])"}
  <div class="card border-0 rounded-0 mb-2">
    <div class="card-body row py-2">
      {volist name="categorys" id="category" offset="0" length="12"}
      <div class="col-3 px-2 my-2">
        <a class="btn btn-sm btn-block btn-light rounded-pill" href="{:cmsUrlCategory($category)}">{$category.term_name|cmsSubstr=0,4,false}</a>
      </div>
      {/volist}
    </div>
  </div>
  <!--item-->
  <div class="card rounded-0 border-0 mb-2">
    <div class="card-body row pb-0">
      {volist name="data" id="cms"}
        {include file="widget/item" /}
      {/volist}
    </div>
  </div>
  {if $page_list}
  <div class="w-100 bg-white pt-3 mb-2 d-flex justify-content-center">{$page_list}</div>
  {/if}
  <!--hot-->
  <ul class="nav nav-tabs" id="myTab">
    <li class="nav-item">
      <a class="nav-link font-weight-bold active" data-toggle="tab" href="#views"><i class="fa fa-fw fa-navicon mr-1"></i>热门</a>
    </li>
    <li class="nav-item">
      <a class="nav-link font-weight-bold" data-toggle="tab" href="#order"><i class="fa fa-fw fa-navicon mr-1"></i>精选</a>
    </li>
  </ul>
  <div class="tab-content bg-white pt-3 pb-1 mb-2" id="myTabContent">
    <div class="tab-pane fade show active" id="views">
      {volist name=":cmsSelect(['field'=>'info_name,info_slug,info_action,info_create_time','status'=>'normal','limit'=>20,'sort'=>'info_views','order'=>'desc'])" id="cms"}
        {include file="widget/item" /}
      {/volist}
    </div>
    <div class="tab-pane fade" id="order">
      {volist name=":cmsSelect(['field'=>'info_name,info_slug,info_action,info_create_time','status'=>'normal','limit'=>20,'sort'=>'info_order','order'=>'desc'])" id="cms"}
        {include file="widget/item" /}
      {/volist}
    </div>
  </div>
</div>
{/block}
{block name="footer"}{include file="widget/footer" /}{/block}